home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / U-Utilities / (c)u3.d64 / disk doctor.c (.txt) < prev    next >
Commodore BASIC  |  2007-02-11  |  6KB  |  161 lines

  1. 0 DN=8:REM DEVICE #
  2. 2 POKE53280,11:POKE53281,0:DIMA$,I,S$,T$,CC,B,SS,E$,J,TE,A:GOTO78
  3. 4 GETA$:IFCC<292THENIFA$>""THENPRINT"                                       ";:CC=293:RETURN
  4. 6 IFA$=""THEN252
  5. 8 CC=293:RETURN
  6. 10 IFI<0THENI=280+I:IFI>255THENI=I-40
  7. 12 IFI>255THENI=I-INT(I/40)*40
  8. 14 PRINT""SPC(10)PEEK(SS+I)"[157]   ":PRINT""SPC(10)I"[157]   "
  9. 16 PRINT"VALUE:     ":PRINT"POSITION:"
  10. 18 FORJ=1TO2:POKEI+SS,(PEEK(I+SS)+128)AND255:FORD=0TO1:NEXTD,J
  11. 20 GOSUB4:IFA$=""THEN18
  12. 22 IFPFTHEN66
  13. 24 IFA$=""THENI=(I+1)AND255:GOTO14
  14. 26 IFA$="[157]"THENI=(I-1)AND255:GOTO14
  15. 28 IFA$="[145]"THENI=I-40:GOTO10
  16. 30 IFA$=""THENI=I+40:GOTO10
  17. 32 IFA$=""THENI=0:GOTO10
  18. 34 IFA$="N"THENT$=STR$(PEEK(SS)):S$=STR$(PEEK(SS+1)):GOTO128
  19. 36 IFA$="J"THENT$=STR$(PEEK(SS+I)):S$=STR$(PEEK(SS+I+1)):GOTO128
  20. 38 IFA$="Q"THENPRINT#15,"I0":RUN
  21. 40 IFA$="+"THENS$=STR$(VAL(S$)+1):GOTO128
  22. 42 IFA$="-"THENS$=STR$((VAL(S$)-1)*SGN(VAL(S$))):GOTO128
  23. 44 IFA$="R"THEN174
  24. 46 IFA$="B"THEN116
  25. 48 IFA$="T"THENPRINT"":GOSUB218:PRINT"":GOSUB218:GOTO64
  26. 50 IFA$=CHR$(3)THEN74
  27. 52 IFA$<>"@"THEN10
  28. 54 IFI<0THENI=280+I:IFI>255THENI=I-40
  29. 56 IFI>255THENI=I-INT(I/40)*40
  30. 58 PRINT""SPC(10)PEEK(SS+I)"[157]   ":PRINT""SPC(10)I"[157]   "
  31. 60 POKE198,0:PRINT"NEW VALUE: ";:INPUT#9,B$:PRINT
  32. 62 PRINT"[145]"SPC(20)"               ":B=VAL(B$):GOTO166
  33. 64 PRINT"   [208]RESS [[210][197][212][213][210][206]] TO END TEXT MODE":PF=1:GETA$:GOTO10
  34. 66 IFA$=CHR$(13)THENPF=0:PRINT"":GOSUB202:GOTO10
  35. 68 IFA$=""THEN20
  36. 70 B=ASC(A$):GOTO168
  37. 72 PRINT"":GOSUB202:GOTO10
  38. 74 PRINT#15,"I0":PRINT"":IFPEEK(788)=52THENPOKE788,49
  39. 76 PRINT"    ";:END:RUN
  40. 78 A=828:TEM=A:REM FILEREAD
  41. 80 POKE210,INT(A/256):POKE209,A-256*PEEK(210):POKE211,0
  42. 82 PRINT""CHR$(34)CHR$(34)CHR$(20)"[146]B [198][191] [146]@ [164][191]Y[146][184]D[200][208][183][146][204][204][191]"
  43. 84 IFPEEK(788)=49THENPOKE788,52:REM STOP KEY DISABLE
  44. 86 PRINT"[153]";
  45. 88 SS=1024+120:I=0:B=0:J=0
  46. 90 A$="":E$="":T$="":S$=""
  47. 92 PRINT"[147][153][208]LEASE PUT THE [211][201][195][203] [196][201][211][203] IN DRIVE 0."
  48. 94 PRINT"[217]OU SHOULD USE THE [196][207][211] '[214]' COMMAND TO"
  49. 96 PRINT"UPDATE THE [194][193][205] ON THE DISK WHEN DONE."
  50. 98 PRINT"[206]OTE: [196]ISK DEVICE IS"DN"[157]."
  51. 100 PRINT"[208]RESS [193][206][217] [203][197][217] TO CONTINUE"
  52. 102 GOSUB4:IFA$=""THEN102
  53. 104 GOSUB10021:IFA$=CHR$(3)THEN74
  54. 106 OPEN1,DN,2,"0:[160][160][160],S,R":INPUT#15,E$:IFE$="62"THENCLOSE1:GOTO114
  55. 108 IFE$>"64"THENINPUT#1,E$:PRINT"[147]"E$"  ON DRIVE 0"
  56. 110 IFE$="21"THENGOSUB184
  57. 112 PRINT#15,"I0"
  58. 114 OPEN2,DN,2,"#2":PRINT"[147]"
  59. 116 GOSUB192
  60. 118 PRINT"      [212][210][193][195][203]   "MID$(STR$(VAL(T$)),2)"[160]"
  61. 120 PRINT"      [211][197][195][212][207][210]  "MID$(STR$(VAL(S$)),2)"[160][145][145]
  62. 122 [153]"RIGHT$NPUT (null)(null)ATNLEN(null):  ";:[132]9,T$:[153]:[139]T$[178][199](160)[167]74
  63. 124 [153]"ON     ":[153]"RIGHT$NPUT (null)VALLEN(null)(null)(null): ";:[132]9,S$:[153]:[139]S$[178][199](160)[167]74
  64. 126 [153]"ON     ":T$[178][202]([196]([197](T$)),2):S$[178][202]([196]([197](S$)),2)
  65. 128 [139][197](T$)[178]0[167]116
  66. 130 [153]"                                       "
  67. 132 [153]"                                       "
  68. 134 [153]"                                       "
  69. 136 [152]15,"U1:2,0,"T$","S$:[143] CH2 DR0
  70. 138 [132]15,E1$,E2$,E3$,E4$:[139]E1$[178]"00"[167]156
  71. 140 [141]192:E2$[178]" STR$RIGHT$(null)(null) VAL(null)(null)(null)(null) #"[170]E1$[170]","[170]E2$
  72. 142 [153]"":[129]I[178]1[164][195](E2$):[153]"AND";:[130]:[153]:[153]""E2$
  73. 144 [129]I[178]1[164][195](E2$):[153]"TAB(";:[130]:[153]
  74. 146 [153]"IN (null)(null)ATNLEN(null)"[197](E3$)"CMD, (null)VALLEN(null)(null)(null)"[197](E4$):[139]E1$[178]"66"[167]118
  75. 148 [153]"TRY AGAIN? (CR/N OR Y)"
  76. 150 [161]A$:[139]A$[178]""[167]150
  77. 152 [139]A$[178]"Y"[167]136
  78. 154 [152]15,"I0":[138]
  79. 156 [141]192:[152]15,"B-P:2,0":[143] CH2 POS1
  80. 158 [158]TEM
  81. 160 I[178]0
  82. 162 [153]:[151]198,0
  83. 164 [137]10
  84. 166 [139]B[177]255[176][198](B$)[178]160[167]174
  85. 168 [151]SS[170]I,B:
  86. 170 [152]15,"B-P:2,"[196](I):[152]2,[199](B);
  87. 172 I[178]I[170]1:[137]164
  88. 174 [153]"ATN(null)VAL (null)(null)(null) (null)(null)(null)VAL (N OR Y)"
  89. 176 [161]A$:J[178][171](A$[178]"Y")[171]2[172](A$[178]"N")[171]3[172](A$[178][199](3)):[145]J[137]178,72,74:[137]176
  90. 178 [152]15,"M-W"Z$[199](19)[199](2)[199]([194](SS))[199]([194](SS[170]1))
  91. 180 [152]15,"U2:2,0,"T$","S$
  92. 182 [152]15,"I0":[138]
  93. 184 [153]"NO DISK IN DRIVE 0
  94. 186 PRINT"PLACE DISK IN DRIVE 0, PRESS ANY KEY
  95. 188 [161]A$:[139]A$[178]""[167]188
  96. 190 [142]
  97. 192 [153]"ONORTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN^ ORTANTANTANTANTANTANTANTAN^ORTANTANTANTANTANTANTANTANTAN^";
  98. 194 [153]"(null)STR$ISK STR$OCTOR 64.0(null) (null)(null)(null)ATNLEN(null):"[201]("  "[170]T$,2)"(null)(null)(null)VALLEN(null)(null)(null):"[201]("  "[170]S$,2)"(null)";
  99. 196 [153]">TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN>TAN>TANTANTANTANTANTANTANTAN>>TANTANTANTANTANTANTANTANTAN>";
  100. 198 [129]I[178]1[164]8:[153]"                                ";:[130]
  101. 200 [153]"ORTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANEXP"
  102. 202 [153]"PRESS [@] - LENHANGE BYTE UNDER CURSOR  "
  103. 204 [153]"      [(null)] - CHR$O TO (null)WAITEXT BLOCK OF FILE  "
  104. 206 [153]"      [MID$] - MID$WAITUMP TO LINK UNDER CURSOR "
  105. 208 [153]"      [(null)] - (null)WAITUIT                      "
  106. 210 [153]"      [(null)] - (null)WAITEWRITE CURRENT BLOCK     "
  107. 212 [153]"      [PEEK] - (null)EW PEEKWAITLOCK                 "
  108. 214 [153]"      [(null)] - ATNDD (null)WAITEXT STRING           "
  109. 216 [153]"  [+]/[-] - (null)CAN FORWARD/BACKWARD     "
  110. 218 [129]D[178]1[164]5:[153]"                                        ";:[130]
  111. 220 [129]D[178]217[164]242:[151]D,[194](D)[176]128:[130]:[153]"";
  112. 222 [142]
  113. 224 CV[178]1:CM$[178]"CHR$ET (null)(null)(null)(null)VAL(null), THE ULTIMATE PROGRAM MANIPULATION SYSTEM, AT ":[143]"GOSUBLOAD
  114. 226 CM$=CM$+"YOUR LOCAL DEALER. [201]T ADDS OVER 1100 NEW":REM"[141][147]
  115. 228 CM$[178]CM$[170]" EDITING AND DISK FUNCTIONS. (null)PEND LESS TIME CORRECTING YOUR "
  116. 230 CM$[178]CM$[170]"MISTAKES AND MORE TIME PROGRAMMING.   ":[143]"GOSUBLOAD
  117. 232 CM$=CM$+"[193] [195]OMMODORE 64 WITHOUT [211][217][211][210][197][211] IS ONLY A [195]OMMODORE 63.5!"
  118. 234 RETURN:
  119. 236 CV=2:CM$="**[206][197][215]** FROM [211][207][204][201][196][213][211] [201][206][212][197][210][206][193][212][201][207][206][193][204]...                        "
  120. 238 CM$=CM$+"[211][207][204][201][196][197][216], THE PERSONAL DATA FILER.      ":REM"[141][147]
  121. 240 CM$[178]CM$[170]"(null)TORE NOTES, RECORDS, RECIPES, ETC. ON ELECTRONIC INDEX CARDS. "
  122. 242 CM$[178]CM$[170]"   LEFT$UNDREDS OF USES AROUND THE HOME ":[143]"GOSUBLOAD
  123. 244 CM$=CM$+"AND OFFICE. [211]EE IT AT YOUR LOCAL DEALER."
  124. 246 RETURN:
  125. 248 CV=2:CM$="[212]HIS PROGRAM HAS BEEN RELEASED TO PUBLIC DOMAIN COURTESY OF "
  126. 250 CM$=CM$+"[211]OLIDUS [201]NTERNATIONAL [195]ORPORATION":RETURN:"[141][147]
  127. 252 [139]CC[178]0[167][141]248
  128. 254 [139]CC[177]750[167]CC[178]0:[145]CV[141]236,224
  129. 256 CC[178]CC[170]1:[139]CC[177]292[167][142]:"GOSUBLOAD
  130. 258 PRINT"";
  131. 260 CP=INT(CC)
  132. 262 IFCP<39THENPRINTSPC(39-CP)LEFT$(CM$,CP)"";:RETURN:"[141][147]
  133. 264 [153][200]([200]([202](CM$,CP[171]38),39)[170]"                                      ",39)""
  134. 266 [142]
  135. 10000 "GOSUBLOADSYS
  136. 10020 "[208]ROGRAM: ""[196]ISK [196]OCTOR 64"
  137. 10021 GOTO10123:"
  138. 10025 "
  139. 10030 "[193]UTHOR: [196]ON [204]EKEI
  140. 10035 "
  141. 10036 "
  142. 10040 "(null)HIS PROGRAM IS PROVIDED COURTESY OF:
  143. 10045 "
  144. 10050 "   (null)OLIDUS RIGHT$NTERNATIONAL LENORPORATION
  145. 10060 "    [211]UITE #5, 144 [215]EST 15TH [211]TREET
  146. 10070 "         (null)ORTH (null)ANCOUVER, PEEK.LEN.
  147. 10075 "         [208]HONE: (604)984-0477
  148. 10080 "
  149. 10090 "[212]O GET THE [205][193][216][201][205][213][205] USE OUT OF YOUR NEW
  150. 10100 "LENOMMODORE-64 COMPUTER AND YOUR DISK
  151. 10110 "DRIVE, WE RECOMMEND USING:
  152. 10123 Z$[178][199](0):[143]"GOSUBONCLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSEON
  153. 10124 OPEN15,DN,15:REM"[141][145][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][145]
  154. 10125 [159]9,0:[143]"GOSUBONCLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSEON
  155. 10126 RETURN:REM"[141][145][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][145]
  156. 10130 "GOSUB             *** (null)(null)(null)(null)VAL(null) ***
  157. 10135 "
  158. 10140 "  ""(null)HE (null)LTIMATE (null)ROGRAM (null)ANIPULATION
  159. 10150 "  [211]YSTEM FOR [195]OMMODORE [205]ICROCOMPUTERS."
  160. 10170 "[141][158][206]OW AVAILABLE AT YOUR [195]OMMODORE DEALER.
  161.